package com.jsp.controller.usercontroller;

import com.jsp.entity.User;
import com.jsp.entity.UserVO;
import com.jsp.mapper.impl.BzdmMapperImpl;
import com.jsp.mapper.impl.DepartMapperImpl;
import com.jsp.mapper.impl.UserMapperImpl;
import com.jsp.util.MD5Utils;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Objects;


@WebServlet("/toDetail")
public class UserToDetailServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) {
        try{
        DepartMapperImpl departMapper = new DepartMapperImpl();
        request.setAttribute("departList", departMapper.findAll());
        BzdmMapperImpl bzdmMapper = new BzdmMapperImpl();
        request.setAttribute("sexList", bzdmMapper.findAll());
        request.getRequestDispatcher("/detail.jsp").forward(request, response);
    }catch (ServletException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    }
}
